//@flow

/**
 * 页面基类
 * 
 * 1,参数类型定义，方便传值定义
 * 2，横竖屏控制
 * 3，请求拦截？
 * 4，网络状态提示
 * 5，输入框组件
 * 6，滚动列表为基础组件
 * 7，页面名字
 * 8，页面异常
 * 9，自定义导航条-1:常规 2:自动隐藏 3:透明渐变 4:没有
 * 10，
 */

import React, { Component } from 'react';
import { 
    View,
    Text,
    ScrollView,
 } from 'react-native';
import { SafeAreaView } from "react-navigation";
import { NavBar } from '../container/navBar';
import { THEME_COLOR } from '../util/constant/ui';
import { Navigate } from '../common/navigate';
import { NavBackBtn } from '../container/navBackBtn';
import { Props as NavProps } from "../container/navBar";



export const PageHOC = (OriginPage:React.Component,reqParams:Object)=>{
    console.log(`访问页面：${OriginPage.PAGE_NAME}`)
    return class Wrapped extends OriginPage {
        
        render(){
            return super.render()
            // return (
                // <View>
                //     {
                //         this.navView == null ? null
                //                              : <NavBar style={{backgroundColor: THEME_COLOR}}  
                //                                        titleView={this.navView.titleView}
                //                                        leftItems={this.navView.leftItems}
                //                                        rightItems={this.navView.rightItems} />
                //     }
                //     <ScrollView>
                //         {super.render()}
                //     </ScrollView>
                // </View>
            // )
        }
    }
}

